﻿/*
 *  Source code courtesy of the desktopWeb.CodePlex.com community project. See MS-PL license on Codeplex.com. 
 *  This is beta code not intended for a production application.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyData.ExpressionBuilder.Model;
using System.ComponentModel;
using MyData.ExpressionBuilder.Interfaces;

namespace MyData.ExpressionBuilder.BaseExtensions
{

  public abstract class ExpressionBase : IExpressionExtension
  {
    public string Name
    {
      get { return this.GetType().Name; }
    }
  }

  //Create IExpressionExtension base class
  //IExpressionExtension
  public abstract class ExpressionTypeConverterBase : IExpressionExtension, IExpressionTypeConverter 
  {
    protected abstract object CommitedTextExtension(List<MyData.ExpressionBuilder.Model.ListItem> nameValues);
    
    protected ExpressionTypeConverterBase() { }

    //Convert(List<ListItem> nameValues);
    public object CommitedText(List<MyData.ExpressionBuilder.Model.ListItem> nameValues)
    {
      return this.CommitedTextExtension(nameValues);      
    }
  }
}
